package org.restorator.service;

import java.util.Collection;

/**
 * @author Snisar Bogdan.
 */
public interface DtoAssebler<E, D> {
    /**
     * Create DTO object, as {@code D} from {@code E}.
     * @param actual actual entity
     * @return new DTO object
     */
    D toDto(E actual);

    Collection<D> toDto(Collection<E> actual);

    E fromDto(D dto);

    Collection<E> fromDto(Collection<D> dtos);
}
